//
//  UserNewsTableViewCell.m
//  huien
//
//  Created by yiban on 2017/5/27.
//  Copyright © 2017年 lcb. All rights reserved.
//

#import "UserNewsTableViewCell.h"
@interface UserNewsTableViewCell ()
@property(nonatomic,strong)UILabel *newLabel;
@property(nonatomic,strong)UILabel*morenewLabel1;
@end


@implementation UserNewsTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
    }
    return self;
}
/// 根据数据模型来显示内容
- (void)showInfo:(id)model indexPath:(NSIndexPath *)indexPath
{
    self.data =model;
    self.indexPath=indexPath;
    LoansModel *loan = (LoansModel*)model;
    
    self.newLabel.frame =CGRectMake(10, (25)/2, SCREEN_WIDTH-50, 50/2);
    self.newLabel.text =loan.loantitle;
    self.morenewLabel1.frame = CGRectMake( SCREEN_WIDTH-50, (25)/2, 40, 50/2);
}
+(CGFloat)returnCellHeight
{
    return 50;
}
-(void)dealloc
{
    [LcbLog log:@"UserNewsTableViewCell--------->dealloc"];
}

-(UILabel*)newLabel
{
    if (!_newLabel) {
        _newLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        _newLabel.tag=1;
        _newLabel.userInteractionEnabled = YES;
        _newLabel.font = [UIFont systemFontOfSize:17];
        _newLabel.textColor=adscolor;
        _newLabel.textAlignment = NSTextAlignmentLeft;
        [self addSubview:_newLabel];
    }
    return _newLabel;
}
-(UILabel*)morenewLabel1
{
    if (!_morenewLabel1) {
        _morenewLabel1 = [[UILabel alloc]initWithFrame:CGRectZero];
        _morenewLabel1.userInteractionEnabled = YES;
        _morenewLabel1.textColor =[UIColor redColor];
        _morenewLabel1.font = [UIFont systemFontOfSize:16];
        _morenewLabel1.text =@"更多";
        _morenewLabel1.textAlignment = NSTextAlignmentRight;
        [self addSubview:_morenewLabel1];
    }
    return _morenewLabel1;
}

@end
